
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{ 
			return false;
		}
	}
	//删除图组图片
	function mdel_img(path){
		$('#img_list div img').each(function(index, element) {
			$.post("{:U('delImgBypath')}",{'path':path},function(data){
				if(data=='OK'){
					
					$('#img_list div').each(function(index, element) {
                        if($(this).attr('url')==path){
							$(this).remove();
						}
                    });
					
					$('#picmsg input').each(function(index, element) {
                        if($(this).val()==path){
							$(this).remove();
						}
                    });
				}
			});
		});
	}
	
	
	function changeAffConfig(e){
		var val = $(e).val().split('_');
		$('#AffiliateConfigclassname').val(val[0]);
		$('#AffiliateConfigtitle').val(val[1]);
	}
	
  </script>

    <form class="checkoutform" action="{:U('insert')}" method="post">
    
    
    
    
    
    
    
    
    
    

    
    
    

   
   
   
    
    
    
    
    
    
    <div class="form-group" style="display:none;">
      <label class="control-label">规则名称</label>
      <div>
         <input class="form-control" datatype="*"  value="{$info.title}" id="AffiliateConfigtitle" name="title" type="text" placeholder="规则名称">
         <input class="form-control" datatype="*"  value="{$info.classname}" id="AffiliateConfigclassname" name="classname" type="text" placeholder="规则名称">
      </div>
   </div>
    
    
    <div class="form-group">
      <label class="control-label">工具库名称（类名）</label>
      <div>
      
      
      <select name="" class="form-control" onChange="changeAffConfig(this);">
      <option value="">请选择</option>
      <volist name="AffiliateConfig" id="vo">
          <option value="{$vo.value}_{$vo.title}">{$vo.title}</option>
          </volist>
      </select>
      
      
         
      </div>
   </div>
   
      
    </form>
    

